var myscroll;

function loaded() {
    myscroll = new IScroll("#main", {
        scrollbars: true,
		mouseWheel: true,
		interactiveScrollbars: true,
		shrinkScrollbars: 'scale',
		fadeScrollbars: true,
        tap: true
    });
}

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

//console.log(document.documentElement.clientHeight);

var links = document.getElementsByTagName('a');
//console.log(links.length);
for (var i=0; i<links.length; i++) {
    var current_link = links[i];
    //console.log(current_link);
    current_link.addEventListener('click', function(e) {
        console.log(e);
        e.preventDefault();
    });
    current_link.addEventListener('tap', function() {
        current_link.href ? location.href = current_link.href : false;
    });
}
